package ltd.jdsoft.cute.perm.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import ltd.jdsoft.cute.perm.dao.UserDAO;
import ltd.jdsoft.cute.perm.model.User;

@Service
public class UserService {

  @Autowired
  private UserDAO userDAO;

  public void add(User user) {
    userDAO.add(user);
  }

  public User getById(long id) {
    return userDAO.getById(id);
  }

  public User getByLoginName(String loginName) {
    return userDAO.getByLoginName(loginName);
  }
}
